<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('员工添加')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-employee-add">
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工姓名：</label>
			<div class="col-sm-8">
				<input name="name" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工邮箱：</label>
			<div class="col-sm-8">
				<input name="email" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工年龄：</label>
			<div class="col-sm-8">
				<input name="age" class="form-control" type="number">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">性别：</label>
			<div class="col-sm-8">
				<div class="radio-box" th:each="dict : ${@dict.getType('sys_user_sex')}">
					<input type="radio" th:id="${dict.id}" name="sex" th:value="${dict.value}" th:checked="${dict.isDefault}">
					<label th:for="${dict.id}" th:text="${dict.label}"></label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">管理员：</label>
			<div class="col-sm-8">
				<div class="radio-box" th:each="dict : ${@dict.getType('si_employee_super')}">
					<input type="radio" th:id="${dict.id}" name="admin" th:value="${dict.value}" th:checked="${dict.isDefault}">
					<label th:for="${dict.id}" th:text="${dict.label}"></label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">所在部门：</label>
			<div class="col-sm-8">
				<select name="deptId" class="form-control m-b" th:with="type=${@dept.list()}" required>
					<option th:each="dict : ${type}" th:text="${dict.name}" th:value="${dict.id}"></option>
				</select>
			</div>
		</div>
	</form>
</div>
<th:block th:include="common/include :: footer" />
<th:block th:include="common/include :: datetimepicker" />
<script th:inline="javascript">
	var prefix = ctx + "/business/employee"
	$("#form-employee-add").validate({
		focusCleanup: true
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/add", $('#form-employee-add').serialize());
		}
	}

	$("input[name='actualArrivalTime']").datetimepicker({
		format: "yyyy-mm-dd hh:ii",
		autoclose: true
	});
</script>
</body>
</html>